<template>
    <!-- 遍历数据 -->
    <div>
    <div v-for="news in newsli" :key="news.newsId">
        <el-col> <el-icon><Tools /></el-icon> {{news.newsIntro}} </el-col>
    </div>
    </div>
</template>

<script>
var Mock = require("mockjs");
export default {
    name: "NewsLi",
    data() {
        return {
            newsli: [],
        };
    },
    mounted() {
        this.getNewsli();
    },
    methods: {
        getNewsli() {
            let data = Mock.mock({
                "news|18": [
                {
                    "newsId|+1": 1,
                    "newsIntro|20": "@cword",
                },
              ],
            });
            this.newsli = data.news;
        },
    },

};
</script>

<style>

</style>